//package com.wwj.my_ummary.config.timedtasks;
//
//
//import com.wwj.my_ummary.videos.mapper.VideosMapper;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//import org.springframework.web.client.RestTemplate;
//
//import javax.annotation.Resource;
//
///**
// * 这是定时任务
// */
//@Component
//public class TimedTasks {
//    @Resource
//    private RestTemplate restTemplate;
//
//    @Resource
//    private VideosMapper videosMapper;
//
//
//
////    @Scheduled(cron = "0 0 18 * * ?")
//    @Scheduled(cron = "* * * * * ?")
//    public void myTimes() {
//
//
//
//
//        String url = "http://159.75.89.91/channel/4";
//
//
//        String result = restTemplate.getForObject(url, String.class);
//        System.out.println(result);  //打印响应结果
//
//
//    }
////        HttpStatus statusCode = null;
////        int id = 0;
////
////        List selVideos = new ArrayList<>();
////        try {
////
////
////            String s = "59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82";
////
////            String[] split = s.split(",");
////            for (String s1 : split) {
////
////                QueryWrapper<Videos> q = new QueryWrapper<>();
////                q.in(Videos.CMC_ACCOUNT_ID,s1);
////                List<Videos> select = videosMapper.selectList(q);
////
////                for (Videos videos : select) {
////                    ResponseEntity<String> forEntity = restTemplate.getForEntity(videos.getVideoPath(), String.class);
////                    id = videos.getId();
////                }
////            }
////
////        } catch (RestClientException e) {
////            e.printStackTrace();
////            selVideos.add(id);
////
////        }
////        System.out.println(selVideos);
////
////    }
//}
